<?php
namespace app\user\event\subscribes\user\admin;

use app\admin\logic\system\Log;
use think\Event;

class TeacherLevel
{
    public function subscribe(Event $event)
    {
        /** 新建 */
        $event->listen('TeacherLevelCreated', function ($level) {
            Log::write('讲师等级【' . $level->title . '】', 'teacher_level', 'create');
        });
        /** 更新 */
        $event->listen('TeacherLevelUpdated', function ($level) {
            Log::write('讲师等级【' . $level->title . '】的信息', 'teacher_level', 'update');
        });
        /** 删除 */
        $event->listen('TeacherLevelDeleted', function ($level) {
            Log::write('讲师等级【' . $level->title . '】', 'teacher_level', 'delete');
        });

    }
}
